<?php

namespace common\db;

/**
 * StaticInstanceInterface is the interface for providing static instances to classes,
 * which can be used to obtain class meta information that can not be expressed in static methods.
 * For example: adjustments made by DI or behaviors reveal only at object level, but might be needed
 * at class (static) level as well.
 *
 * To implement the [[instance()]] method you may use [[StaticInstanceTrait]].
 *
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
interface RegionInterface {

    /**
     * Returns static class instance, which can be used to obtain meta information.
     * @param bool $id whether to re-create static instance even, if it is already cached.
     * @return static class instance.
     */
    public function getRegion();

    /**
     * Returns static class instance, which can be used to obtain meta information.
     * @param bool $id whether to re-create static instance even, if it is already cached.
     * @return static class instance.
     */
    public function getRegionText();

    /**
     * Returns static class instance, which can be used to obtain meta information.
     * @param bool $id whether to re-create static instance even, if it is already cached.
     * @return static class instance.
     */
    public function getAddressDetail();

    /**
     * Returns static class instance, which can be used to obtain meta information.
     * @param bool $id whether to re-create static instance even, if it is already cached.
     * @return static class instance.
     */
    public function getAddress();
}
